﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SmartSpace.Core;

namespace SmartSpace.Data.AutoInput
{
    /// <summary>
    /// 创建用户转换类
    /// </summary>
    public class CreateUserConvertor : IDataConvertor
    {
        public object Convert(string value)
        {
            return new Guid(value);
        }

        public string Convert(object value)
        {
            return ((Guid)value).ToString();
        }

        public void Default(User user, out string text, out object value)
        {
            text = user.Name;
            value = user.Id;
        }
    }
}
